package logo;

import java.text.SimpleDateFormat;
import java.util.Date;

public class Debug {
	
	private static String buildLogString(String message)
	{
		long now = System.currentTimeMillis();
		Date date = new Date(now);
		SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss.SSS");
		
		StringBuilder sb = new StringBuilder();
		sb.append(sdf.format(date));
		sb.append(": ");
		sb.append(message);
		return sb.toString();
	}
	
	public static void log(String message)
	{
		System.out.println(Debug.buildLogString(message));
	}

	public static void error(String message)
	{
		System.err.println(Debug.buildLogString(message));
	}
}
